package com.bball.court.http;

import android.content.Context;
import android.util.Log;

import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.VolleyError;
import com.bball.court.http.base.GsonDeleteRequest;
import com.bball.court.model.Court;

public class DeletePlayerToCourtRequest extends GsonDeleteRequest<Court> {

    public DeletePlayerToCourtRequest(Context context, String url, String tag, final DeletePlayerToCourtRequestCallbacks callbacks) {
        super(context, url, Court.class, tag, new Listener<Court>() {
            @Override
            public void onResponse(Court court) {
                callbacks.onDeletePlayerSuccess(court);
            }
        }, new ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                Log.e(getClass().getSimpleName(), error.getMessage(), error);
                callbacks.onDeletePlayerFail(new RuntimeException(error));
            }
        });
    }

}
